//
//  ContentTableViewCell.m
//  EveryDayNews
//
//  Created by 徐继垚 on 14/11/28.
//  Copyright (c) 2014年 徐继垚. All rights reserved.
//

#import "ContentTableViewCell.h"

@implementation ContentTableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(10 * Width, 10 * Height, 210 * Width, 50 * Height)];
        _contentLabel.text = @"sjdufhsdiojfsdjfopsmadosafklmasflasmf";
        _contentLabel.textColor = [UIColor colorWithRed:93/255.0 green:93/255.0 blue:93/255.0 alpha:1];
        _contentLabel.numberOfLines = 0;
        _contentLabel.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:_contentLabel];
        
        _aimageView = [[UIImageView alloc]initWithFrame:CGRectMake(230 * Width, 10 * Height, 80 * Width, 80 * Height)];
      //  _aimageView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_aimageView];
        
        
        _smailLabel = [[UILabel alloc]initWithFrame:CGRectMake(10 * Width, 60 * Height, 230 * Width, 20)];
       
        _smailLabel.textColor = [UIColor lightGrayColor];
        [self.contentView addSubview:_smailLabel];
        
        
        
        
        
    }
    
    return self;
}

- (void)setMyData:(TodayHotModel *)myData
{
    _myData = myData;
  
    [self.aimageView setImageWithURL:[NSURL URLWithString:_myData.aimage]] ;
    self.contentLabel.text = _myData.tittle;
    
   
    [self setNeedsLayout];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
